AFFILIATE PAYOUTS DUE:  
query($q); while ($db->next_record()) { $affiliate_id = $db->f("affiliate_id"); if (get_affiliate_payout($affiliate_id) > 0) { ?>
p("affiliate_id"); ?> p("affiliate_name"); ?>
AMOUNT DUE:
f("affiliate_id")); if ($referrals == 0) { echo " No referrals"; } else { ?> Referrals ( ) ">details
  p("affiliate_address"); ?>
p("affiliate_city"); ?>
, p("affiliate_state"); ?> p("affiliate_zip"); ?>
f("affiliate_id"); printf("%.2f", get_affiliate_payout($affiliate_id)); ?>
f("affiliate_id")); if ($orders == 0) { echo " No Orders"; } else { ?> Orders ( )  

NO RESULTS FOR THIS SEARCH"; } else { ?>

After you have mailed each affiliate their payout,
please click here to update the database.